import {SAVETOKEN,SAVEUSERINFO,LAYOUTINFO} from './mutation-types'

export default {
    saveToken({commit},token){
        commit(SAVETOKEN,{token})
    },
    saveUserInfo({commit},userInfo){
        commit(SAVEUSERINFO,{userInfo})
    },
    layoutInfo({commit},layout={}){
        layout={
            title:layout.title||'贸易跟单系统',
            showHome:layout.showHome===undefined?true:layout.showHome,
            showBack:layout.showBack===undefined?false:layout.showBack
        }
        commit(LAYOUTINFO,{layout})
    }
}